
//将歌单歌曲添加进播放列表中,不影响播放列表中其他歌曲
import {ref} from 'vue'
import store from '../store/index'
import {createSong} from '../class/Song'





export default function (playList) {

    console.log("songList",playList);

    const newPlayList = [];
    playList.forEach(item => {
        // item.
        newPlayList.push(createSong(item))
    });

    console.log("playList",newPlayList);
    
    
    // const store = useStore1();
    console.log("store",store);
    


    store.dispatch('addAllSongs',newPlayList)

}